package com.segmentfault.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class HelloController {
//    请求映射
    /*
    http://localhost:8080/mvc/helloworld --> 返回hello
    hello -> 视图处理器 --> /WEB-INF/pages/hello.jsp
     */
    @RequestMapping(value = "helloworld", method = RequestMethod.GET)
    public String helloworld() {
        return "hello";
    }
}
